var express = require('express');
var router = express.Router();
const getRateController = require("../controllers/getRate_controller")
router.get("/getRate", (req, res) => {
    var {
        rate,
        collectionName
    } = req.query

    console.log(collectionName);
    getRateController.getRatelist(rate, collectionName, ["获取失败", "获取成功"], (result) => {
        res.json(result)
    })
})
router.get("/getAllRate", (req, res) => {
    var {
        rate,
        collectionName
    } = req.query

    console.log(collectionName);
    getRateController.getAllRatelist(rate, collectionName, ["获取失败", "获取成功"], (result) => {
        res.json(result)
    })
})
module.exports = router;